<?php
    class ExectiveFile
    {
        public CONST MODE_INCLUDE = 2;
        public CONST MODE_INCLUDE_ONCE = 3;
        public CONST MODE_REQUIRE = 4;
        public CONST MODE_REQUIRE_ONCE = 5;
        private $_file;
        public function __construct($file)
        {
            $this->_file = $file;
        }
        
        public function exec($mode)
        {
            if(!isset($this->_file))
            {
                trigger_error("__CLASS__ not initialized");
                exit(0);
            }
            include($this->_file);
        }
        
        public function save()
        {
            Storage::getInstance()->save($this);
        }
        public function getContent()
        {
            return file_get_contents($this->_file);
        }
        
    }
    class Storage
    {
        private static $_instance;
        public static function getInstance()
        {
            if(!(self::$_instance instanceof __CLASS__))
                self::$_instance = new __CLASS__;
            return self::$_instance;
        }
        
        protected function __construct()
        {
            
        }
        private function filter($string)
        {
            
        }
        public function save(ExectiveFile $file)
        {
            $content = $file->getContent();
            $realstring = filter($content);
        }
    }